Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 6 - Printing Resources / Printing Resources Reference
Resources Used Only for Printing Extensions


The Extension Scope ('scop') Resource

You must define at least one extension scope resource, of type gxExtensionScopeType, for each printing extension that you develop. This resource indicates the types of drivers and imaging systems with which your extension is compatible. Figure 6-6 shows the structure of an extension scope resource.

Figure 6-6 The extension scope resource

The extension scope resource consists of a variable number of scope values.

The ID of each extension scope resource defines the type of information that is contained in the resource values. Constants for the scope resource IDs are shown in Table 6-9.
Table 6-9 Scope resource identifiers
ConstantValueExplanation
gxDriverScopeIDgxPrintingExtensionBaseIDThe imaging system types supported by the extension
gxPrinterScopeIDgxPrintingExtensionBaseID+1Specific driver types supported by the extension
gxPrinterExceptionScopeIDgxPrintingExtensionBaseID+2Specific driver types not supported by the extension

You can include several different extension scope resources in your extension file to pinpoint the scope of your extension. The values in all scope resources are unioned together to produce the exact scope of your extension. A typical pair of scope resources for an extension is shown in Listing 6-5. You can find other examples of scope resources in Listing 2-21 on page 2-35 and Listing 2-22 on page 2-36 in the chapter "Printing Extensions."

Listing 6-5 An example of a pair of extension resources used together

resource gxExtensionScopeType (gxPrinterScopeID, sysHeap,
                                                   purgeable)
{
   {
      gxPostscriptPrinterType,
      gxRasterPrinterType
   };
};
resource gxExtensionScopeType (gxPrinterExceptionScopeID, sysHeap,
                                                       purgeable)
{
   {
      'ODD1'
   };
};
In this example, the first extension scope resource defines the extension as compatible with all PostScript and raster printers. The second resource specifies that the extension is not compatible with the printer driver name 'ODD1'. The net result is that the extension is compatible with all PostScript and raster printers that do not use the 'ODD1' driver.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help